package com.dai.design.dependencyinversion;

/**
 * @author daijiyong
 */
public class DependencyInversionTest {
    public static void main(String[] args) {

        //定义一个售货员
        Salesperson salesperson = new Salesperson();

        // 卖香皂
        salesperson.saleCommodity(new SoapCommodity());

        // 卖香蕉
        salesperson.saleCommodity(new BananaCommodity());
    }
}
